package com.shixi.util;

import java.text.SimpleDateFormat;
import java.util.Date;

public class TimeUtil {

    /*获取下单时间*/
    public static String getOrderTime(){
        Date date=new Date();
        SimpleDateFormat spf = new SimpleDateFormat("yyyyMMddHHmmss");
        return spf.format(date);
    }

    /*算法生成商品号*/
    public static String makePicUrl(Integer goodsid){
        Date date=new Date();
        SimpleDateFormat spf = new SimpleDateFormat("yyyyMMddHHmmss");
        return spf.format(date) + goodsid;
    }

    /*算法生成订单号*/
    public static String makeOrderId(Integer goodsid){
        Date date=new Date();
        SimpleDateFormat spf = new SimpleDateFormat("yyyyMMddHHmmss");
        return spf.format(date) + goodsid;
    }
}
